﻿@model IEnumerable<WebUI.Models.aspnet_Users>
@{ var tm = new WebUI.Models.aspnet_Users();}
@Html.Partial("SearchPartial", new ViewDataDictionary
{ 
    { "SearchAction", "DrList" },
    { "UpdateTargetId", "DoctorListView" },
    {"NewLinkTitle", "新建医生注册"},
    {"NewLinkAction", "DrEdit"},
    {"NewLinkArg", new { ID = Guid.Empty }},    
    {"DialogTitle", "医生注册"}
})
<table class="width">
    <tr>
        <th>
            @Html.LabelFor(model => tm.UserName)
        </th>
        <th>
            @Html.LabelFor(model => tm.MobileAlias)
        </th>
        <th>
            @Html.LabelFor(model => tm.Hospital)
        </th>
        <th>
            @Html.LabelFor(model => tm.BingQu)
        </th>
        <th>
            @Html.LabelFor(model => tm.Department)
        </th>
        <th>
            @Html.LabelFor(model => tm.AccountStatusRef)
        </th>
        <th>
            @Html.LabelFor(model => tm.Gender)
        </th>
        <th>
        </th>
    </tr>
    @foreach (var item in Model)
    {
        <tr>
            <td>
                @Html.DisplayFor(modelItem => item.UserName)
            </td>
            <td>
                @Html.DisplayFor(modelItem => item.MobileAlias)
            </td>            
            <td>
                @Html.DisplayFor(modelItem => item.Hospital.HospName)
            </td>
            <td>
                @Html.DisplayFor(modelItem => item.BingQu.Title)
            </td>
            <td>
                @Html.DisplayFor(modelItem => item.Department.DepName)
            </td>
            <td>
                @Html.DisplayFor(modelItem => item.AccountStatusRef.OptionTitle)
            </td>
            <td>
                @Html.DisplayFor(modelItem => item.Gender)
            </td>
            <td>
                @Ajax.ActionLink("修改", "DrEdit", new { ID = item.UserId }, new AjaxOptions() { LoadingElementId="OnLoadingSpan",UpdateTargetId = "dialogbox", OnComplete = "showDialog('医生信息');", HttpMethod = "Get", InsertionMode = InsertionMode.Replace, OnFailure = "OnSiteError" })
                @Ajax.ActionLink("删除", "DrDelete", new { ID = item.UserId }, new AjaxOptions() { LoadingElementId="OnLoadingSpan",UpdateTargetId = "DoctorListView", HttpMethod = "Get", InsertionMode = InsertionMode.Replace, OnFailure = "OnSiteError", Confirm = OnConfirmDel() })
            </td>
        </tr>
    }
</table>

@Html.Partial("TrHilighter")